import request from '@/plugins/axios'

export function fetchList(query) {
    return request({
        url: '/api/financecollectionreceivable/page',
        method: 'get',
        params: query
    })
}

export function addObj(obj) {
    return request({
        url: '/api/financecollectionreceivable',
        method: 'post',
        data: obj
    })
}

export function getObj(id) {
    return request({
        url: '/api/financecollectionreceivable/' + id,
        method: 'get'
    })
}

export function delObj(id) {
    return request({
        url: '/api/financecollectionreceivable/' + id,
        method: 'delete'
    })
}

export function putObj(obj) {
    return request({
        url: '/api/financecollectionreceivable',
        method: 'put',
        data: obj
    })
}
//获取所有税率设置
export function getTaxesListNotLand(query) {
    return request({
        url: '/api/financecollectionreceivable/getTaxesListNotLand',
        method: 'get',
        params: query
    })
}
//合同基本信息
export function getRentContractPageList(query) {
    return request({
        url: '/api/financecollectionreceivable/getRentContractPageList',
        method: 'get',
        params: query
    })
}
//核算数据（租金）
export function check(contractId) {
    return request({
        url: '/api/financecollectionreceivable/checkList/'+contractId,
        method: 'get'
    })
}
//核算数据（押金）
export function generateProFee(contractId) {
    return request({
        url: '/api/financecollectionreceivable/generateProFee/'+contractId,
        method: 'get'
    })
}
//核算数据提交
export function checkSubmit(obj) {
    return request({
        url: '/api/financecollectionreceivable/checkSubmit/',
        method: 'post',
        data: obj
    })
}
//接收或拒绝
export function addReceive(obj) {
    return request({
        url: '/api/financecollectionreceivable/receive',
        method: 'post',
        data: obj
    })
}
//接收或拒绝
export function rentContractList() {
    return request({
        url: '/api/financecollectionreceivable/rentContractList',
        method: 'get'
    })
}
//导入数据
export function receivableImport(obj) {
    return request({
        url: '/api/financecollectionreceivable/receivableImport',
        method: 'post',
        data: obj,
        config:{
            headers:{'Content-Type':'multipart/form-data'}
        }
    })
}
//催缴
export function handlePress(receivableId) {
    return request({
        url: '/api/financecollectionreceivable/handlePress/'+receivableId,
        method: 'post'
    })
}
//合同信息（查看累计已收款金额）
export function showReceivableList(contractId) {
    return request({
        url: '/api/financecollectionreceivable/getShowReceivableList/'+contractId,
        method: 'get'
    })
}
//发送非税通知书
export function sendPnNum(id) {
    return request({
        url: '/api/financecollectionreceivable/sendPnNum/' + id,
        method: 'post'
    })
}
//确认推送非税单
export function confirmPnNum(id) {
    return request({
        url: '/api/financecollectionreceivable/confirmPnNum/' + id,
        method: 'post'
    })
}




